package com.scs.application.modules.sys.controller;

import com.scs.application.modules.sys.model.RestResult;
import com.scs.application.modules.sys.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 */
@RestController
public class LogoutController {
    @Autowired
    private UserService userService;

    @DeleteMapping(value = "/logout")
    public RestResult logout() {
        userService.logout();
        return RestResult.ok("退出登录成功");
    }
}
